// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

$font-path: '/media/protocol/fonts';
$image-path: '/media/protocol/img';

@import '~@mozilla-protocol/core/protocol/css/includes/lib';
@import '~@mozilla-protocol/core/protocol/css/components/logos/wordmark';
@import '~@mozilla-protocol/core/protocol/css/components/logos/wordmark-product-firefox';

.mzp-c-split {
    overflow: hidden;
    min-height: 400px;

    .mzp-c-wordmark {
        margin-left: auto;
        margin-right: auto;

        @media #{$mq-md} {
            margin-left: 0;
            margin-right: 0;
        }
    }

    .mzp-c-split-media {
        position: relative;
        z-index: 1;

        @media #{$mq-lg} {
            &::before {
                background-image: url('/media/img/firefox/switch/bg.svg');
                background-position: 300px bottom 100px left;
                background-size: auto 100%;
                background-repeat: no-repeat;
                bottom: 0;
                top: -200px;
                content: '';
                display: block;
                left: -50px;
                right: 0;
                position: absolute;
                width: 1000px;
                height: 600px;
                z-index: -1;
            }
        }
    }

    .mzp-c-split-body p {
        @include text-body-lg;
    }
}

// * -------------------------------------------------------------------------- */
// Steps

.c-steps {
    text-align: center;
}

.c-steps-list {
    counter-reset: step-counter;
}

.c-steps-item {
    @include font-size(18px);
    font-weight: bold;
    display: inline-block;
    width: 214px;
    vertical-align: top;
    margin: 0 $layout-sm $layout-sm;

    &::before {
        @include font-size(42px);
        align-items: center;
        background-color: $color-violet-50;
        background-image: url('/media/img/firefox/switch/one.svg');
        background-size: 1.8em auto;
        background-position: center center;
        background-repeat: no-repeat;
        border-radius: 100%;
        color: #fff;
        content: counter(step-counter);
        counter-increment: step-counter;
        display: flex;
        font-weight: bold;
        height: 1.7em;
        justify-content: center;
        margin: 0 auto $spacing-md;
        width: 1.7em;
    }

    &:nth-child(2)::before {
        background-image: url('/media/img/firefox/switch/two.svg');
    }

    &:nth-child(3)::before {
        background-image: url('/media/img/firefox/switch/three.svg');
    }
}

/* -------------------------------------------------------------------------- */
// Social Share

.c-share-title {
    @include text-body-lg;
    font-family: var(--body-font-family);
}

.c-share {
    margin-top: $layout-md;
    padding-top: $layout-sm;
    background-color: $color-marketing-gray-20;
}

.c-share-options li a {
    @include bidi(((padding-left, 24px + $spacing-sm, padding-right, 0),));
    display: inline-block;
    position: relative;

    &::before {
        background-size: cover;
        position: absolute;
        content: '';
        top: 0;
        left: 0;
        height: 20px;
        width: 20px;
    }

    &.bluesky::before {
        background-image: url('/media/img/icons/social/bluesky/black.svg');
    }

    &.facebook {
        &::before {
            background-image: url('#{$image-path}/icons/social/facebook/black.svg');
        }
    }

    &.email::before {
        background-image: url('#{$image-path}/icons/mail.svg');
    }
}

@media #{$mq-md} {

    @supports (display: grid) {
        .c-share-options {
            margin: $layout-sm 0;
            display: grid;
            grid-gap: $layout-lg;
            grid-template-columns: repeat(3, max-content);
            grid-template-rows: auto;
        }
    }
}
